import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
    state: {
        singer: {},
        mv: {}
    },
    mutations: {
        setSinger(state, singer) {
            state.singer = singer
            sessionStorage.setItem("singer", JSON.stringify(singer))
        },
        setMv(state, mv) {
            state.mv = mv
        }
    },
    getters: {
        // singer:state=>state.singer
        singer: (state) => {
            return state.singer
        },
        mv: state => state.mv
    },
    actions: {

    },
    modules: {

    }
})
export default store